@extends('layouts.index')
@section('content')
    <div class="banner-pc-m" zoom-width="1024" zoom-heigh="575">
        <div class="frame"
             style=" background-image:url(/static/images/categorybackground.jpeg); font-size:0;width:100%;"></div>
    </div>
    <div class="banner-pc-n">
        <div class="frame"
             style=" background-image:url(/static/images/categorybackground.jpeg); font-size:0;width:100%;"></div>
    </div>
    <div class="top_nav g_mb_a g_mt_a">
        <div class="g_cw">
            <div class="left">
                <div class="g_title_a">
                    <p class="p1"><span class="title_a">{{$content->category->title}}</span></p>
                    <p class="p2">{{$content->category->name}}</p>
                </div>
            </div>
            <div class="right">
                <p><span>当前位置：</span> <a href="#" class="crumb">首页</a> &gt; <a href="/"
                                                                               class="crumb">{{$content->category->parent->title}}</a>
                    &gt; <a
                        href="#">{{$content->category->title}}</a></p>
            </div>
            <div class="fg"></div>
        </div>
    </div>

    <div class="flex">
        <div class="g_cw">
            <div class="left">
                <div class="title_b my-3 ">
                    <p class="text-xl my-3 text-gray-900 text-center">{{$content->title}}</p>
                    <em class="text-sm block text-center">时间：{{$content->created_at}}</em>
                </div>
                <div>
                    <div class="g_content">
                        {!! $content->content !!}
                    </div>
                    <div class="text-xs flex justify-end">
                        查看次数：
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"
                             xmlns="http://www.w3.org/2000/svg">
                            <path stroke-linecap="round" stroke-linejoin="round"
                                  stroke-width="2"
                                  d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
                            <path
                                stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
                        </svg>
                        {{$content->click}}</div>
                </div>
                <div class="flex justify-center">

                    <a class="px-5 py-2 bg-green-700 text-white"
                       href="{{route('category',$content->category)}}">返回列表</a>
                </div>
            </div>
        </div>
    </div>
@endsection
<style>
    .g_content {
        display: table-cell; /*主要是这个属性*/
        width: 100%;
    }

    .g_content img {
        display: inline-block !important;;
        vertical-align: middle !important;
        text-align: center !important;
        width: 200px !important;
        height: 200px !important;
    }
</style>
